home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Communications Toolbox / CommToolbox 1.1 / Interfaces / CIncludes / GestaltEqu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  13.5 KB  |  339 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.     GestaltEqu.h
  3.     C Interface to the Macintosh Libraries
  4.  
  5.         Copyright Apple Computer, Inc.    1988-1991
  6.         All rights reserved
  7. ************************************************************/
  8.  
  9.  
  10. #ifndef __GESTALTEQU__
  11. #define __GESTALTEQU__
  12.  
  13. #ifndef __TYPES__
  14. #include <Types.h>
  15. #endif
  16.  
  17.  
  18. enum {
  19.  
  20.  
  21. /************************
  22.  *    Gestalt error codes
  23.  ************************/
  24.     gestaltUnknownErr = -5550,              /* value returned if Gestalt doesn't know the answer */
  25.     gestaltUndefSelectorErr = -5551,        /* undefined selector was passed to Gestalt */
  26.     gestaltDupSelectorErr = -5552,          /* tried to add an entry that already existed */
  27.     gestaltLocationErr = -5553,             /* gestalt function ptr wasn't in sysheap */
  28.  
  29. /**************************
  30.  *    Environment Selectors
  31.  **************************/
  32.  
  33. #define gestaltVersion 'vers'               /* gestalt version */
  34. #define gestaltAddressingModeAttr 'addr'    /* addressing mode attributes */
  35.  
  36.     gestalt32BitAddressing = 0,             /* using 32-bit addressing mode */
  37.     gestalt32BitSysZone = 1,                /* 32-bit compatible system zone */
  38.     gestalt32BitCapable = 2,                /* Machine is 32-bit capable */
  39.  
  40. #define gestaltAliasMgrAttr 'alis'          /* Alias Mgr Attributes */
  41.  
  42.     gestaltAliasMgrPresent = 0,             /* True if the Alias Mgr is present */
  43.     gestaltAliasMgrSupportsRemoteAppletalk = 1,    /* True if the Alias Mgr knows about Remote Appletalk */
  44.  
  45. #define gestaltAppleTalkVersion 'atlk'      /* appletalk version */
  46. #define gestaltAUXVersion 'a/ux'            /*a/ux version, if present */
  47. #define gestaltConnMgrAttr 'conn'           /* connection mgr attributes    */
  48.  
  49.     gestaltConnMgrPresent = 0,
  50.     gestaltConnMgrCMSearchFix = 1,          /* Fix to CMAddSearch?     */
  51.     gestaltConnMgrErrorString = 2,            /* has CMGetErrorString() */
  52.     gestaltConnMgrMultiAsyncIO = 3,            /* CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill */
  53.     
  54. #define gestaltCRMAttr 'crm '               /* comm resource mgr attributes */
  55.  
  56.     gestaltCRMPresent = 0,
  57.     gestaltCRMPersistentFix = 1,             /* fix for persistent tools */
  58.     gestaltCRMToolRsrcCalls = 2,             /* has CRMGetToolResource/ReleaseToolResource */
  59.     
  60. #define gestaltCTBVersion 'ctbv'            /* CommToolbox version */
  61. #define gestaltDBAccessMgrAttr 'dbac'       /* Database Access Mgr attributes */
  62.  
  63.     gestaltDBAccessMgrPresent = 0,          /* True if Database Access Mgr present */
  64.  
  65. #define gestaltDITLExtAttr 'ditl'           /* AppenDITL, etc. calls from CTB */
  66.  
  67.     gestaltDITLExtPresent = 0,              /* True if calls are present */
  68.  
  69. #define gestaltEasyAccessAttr 'easy'        /* Easy Access attributes */
  70.  
  71.     gestaltEasyAccessOff = 0,               /* if Easy Access present, but off (no icon) */
  72.     gestaltEasyAccessOn = 1,                /* if Easy Access "On" */
  73.     gestaltEasyAccessSticky = 2             /* if Easy Access "Sticky" */
  74. };
  75. enum {
  76.     gestaltEasyAccessLocked = 3,            /* if Easy Access "Locked" */
  77.  
  78. #define gestaltEditionMgrAttr 'edtn'        /* Edition Mgr attributes */
  79.  
  80.     gestaltEditionMgrPresent = 0,           /* True if Edition Mgr present */
  81.  
  82. #define gestaltAppleEventsAttr 'evnt'       /* Apple Events attributes */
  83.  
  84.     gestaltAppleEventsPresent = 0,          /* True if Apple Events present */
  85.  
  86. #define gestaltFindFolderAttr 'fold'        /* Folder Mgr attributes */
  87.  
  88.     gestaltFindFolderPresent = 0,             /* True if Folder Mgr present */
  89.  
  90. #define gestaltFontMgrAttr 'font'           /* Font Mgr attributes */
  91.  
  92.     gestaltOutlineFonts = 0,                /* True if Outline Fonts supported */
  93.  
  94. #define gestaltFPUType 'fpu '               /* fpu type */
  95.  
  96.     gestaltNoFPU = 0,                       /* no FPU */
  97.     gestalt68881 = 1,                       /* 68881 FPU */
  98.     gestalt68882 = 2,                       /* 68882 FPU */
  99.     gestalt68040FPU = 3,                    /* 68040 built-in FPU */
  100.  
  101. #define gestaltFSAttr 'fs  '                /* file system attributes */
  102.  
  103.     gestaltFullExtFSDispatching = 0,        /* has really cool new HFSDispatch dispatcher */
  104.     gestaltHasFSSpecCalls = 1,              /* has FSSpec calls    */
  105.     gestaltHasFileSystemManager = 2,        /* has a file system manager */
  106.  
  107. #define gestaltFXfrMgrAttr 'fxfr'           /* file transfer manager attributes */
  108.  
  109.     gestaltFXfrMgrPresent = 0,
  110.     gestaltFXfrMgrMultiFile = 1,            /* supports FTSend and FTReceive */
  111.     gestaltFXfrMgrErrorString = 2,             /* supports FTGetErrorString */
  112.     
  113. #define gestaltHardwareAttr 'hdwr'          /* hardware attributes */
  114.  
  115.     gestaltHasVIA1 = 0,                     /* VIA1 exists */
  116.     gestaltHasVIA2 = 1,                     /* VIA2 exists */
  117.     gestaltHasASC = 3,                      /* Apple Sound Chip exists */
  118.     gestaltHasSCC = 4,                      /* SCC exists */
  119.     gestaltHasSCSI = 7                         /* SCSI exists */
  120. };
  121. enum {
  122.     gestaltHasSoftPowerOff = 19,            /* Capable of software power off */
  123.  
  124. #define gestaltHelpMgrAttr 'help'           /* Help Mgr Attributes */
  125.  
  126.     gestaltHelpMgrPresent = 0,              /* true if help mgr is present */
  127.  
  128. #define gestaltKeyboardType 'kbd '          /* keyboard type */
  129.  
  130.     gestaltMacKbd = 1,
  131.     gestaltMacAndPad = 2,
  132.     gestaltMacPlusKbd = 3,
  133.     gestaltExtADBKbd = 4,
  134.     gestaltStdADBKbd = 5,
  135.     gestaltPrtblADBKbd = 6,
  136.     gestaltPrtblISOKbd = 7,
  137.     gestaltStdISOADBKbd = 8,
  138.     gestaltExtISOADBKbd = 9,
  139.     gestaltADBKbdII = 10,
  140.     gestaltADBISOKbdII = 11,
  141.  
  142. #define gestaltLowMemorySize 'lmem'         /* size of low memory area */
  143. #define gestaltLogicalRAMSize 'lram'        /* logical ram size */
  144. #define gestaltMiscAttr 'misc'              /* miscellaneous attributes */
  145.  
  146.     gestaltScrollingThrottle = 0,           /* true if scrolling throttle on */
  147.     gestaltSquareMenuBar = 2,               /* true if menu bar is square */
  148.  
  149. #define gestaltMMUType 'mmu '               /* mmu type */
  150.  
  151.     gestaltNoMMU = 0,                       /* no MMU */
  152.     gestaltAMU = 1,                         /* address management unit */
  153.     gestalt68851 = 2,                       /* 68851 PMMU */
  154.     gestalt68030MMU = 3,                    /* 68030 built-in MMU */
  155.     gestalt68040MMU = 4                     /* 68040 built-in MMU */
  156. };
  157. enum {
  158.  
  159. #define gestaltStdNBPAttr 'nlup'            /* standard nbp attributes */
  160.  
  161.     gestaltStdNBPPresent = 0,
  162.  
  163. #define gestaltNotificationMgrAttr 'nmgr'   /* notification manager attributes */
  164.  
  165.     gestaltNotificationPresent = 0,         /* notification manager exists */
  166.  
  167. #define gestaltNuBusConnectors 'sltc'       /* bitmap of NuBus connectors*/
  168. #define gestaltOSAttr 'os  '                /* o/s attributes */
  169.  
  170.     gestaltSysZoneGrowable = 0,             /* system heap is growable */
  171.     gestaltLaunchCanReturn = 1,             /* can return from launch */
  172.     gestaltLaunchFullFileSpec = 2,          /* can launch from full file spec */
  173.     gestaltLaunchControl = 3,                 /* launch control support available */
  174.     gestaltTempMemSupport = 4,              /* temp memory support */
  175.     gestaltRealTempMemory = 5,              /* temp memory handles are real */
  176.     gestaltTempMemTracked = 6,              /* temporary memory handles are tracked */
  177.     gestaltIPCSupport = 7,                  /* IPC support is present */
  178.     gestaltSysDebuggerSupport = 8,          /* system debugger support is present */
  179.  
  180. #define gestaltOSTable 'ostt'               /*  OS trap table base  */
  181. #define gestaltToolboxTable 'tbtt'          /*  OS trap table base  */
  182. #define gestaltExtToolboxTable 'xttt'       /* Extended Toolbox trap table base */
  183. #define gestaltLogicalPageSize 'pgsz'       /* logical page size */
  184. #define gestaltPowerMgrAttr 'powr'          /* power manager attributes */
  185.  
  186.     gestaltPMgrExists = 0,
  187.     gestaltPMgrCPUIdle = 1,
  188.     gestaltPMgrSCC = 2,
  189.     gestaltPMgrSound = 3,
  190.  
  191. #define gestaltPPCToolboxAttr 'ppc '        /* PPC toolbox attributes */
  192.  
  193. /*
  194.  * PPC will return the combination of following bit fields.
  195.  * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
  196.  * indicates PPC is cuurently is only supports real time delivery
  197.  * and both incoming and outgoing network sessions are allowed.
  198.  * By default local real time delivery is supported as long as PPCInit has been called.*/
  199.  
  200.  
  201.     gestaltPPCToolboxPresent = 0x0000,      /* PPC Toolbox is present  Requires PPCInit to be called */
  202.     gestaltPPCSupportsRealTime = 0x1000,    /* PPC Supports real-time delivery */
  203.     gestaltPPCSupportsIncoming = 0x0001,    /* PPC will deny incoming network requests */
  204.     gestaltPPCSupportsOutGoing = 0x0002,    /* PPC will deny outgoing network requests */
  205.  
  206. #define gestaltProcessorType 'proc'         /* processor type */
  207.  
  208.     gestalt68000 = 1
  209. };
  210. enum {
  211.     gestalt68010 = 2,
  212.     gestalt68020 = 3,
  213.     gestalt68030 = 4,
  214.     gestalt68040 = 5,
  215.  
  216. #define gestaltParityAttr 'prty'            /* parity attributes */
  217.  
  218.     gestaltHasParityCapability = 0,         /* has ability to check parity */
  219.     gestaltParityEnabled = 1,                 /* parity checking enabled */
  220.  
  221. #define gestaltQuickdrawVersion 'qd  '      /* quickdraw version */
  222.  
  223.     gestaltOriginalQD = 0x000,              /* original 1-bit QD */
  224.     gestalt8BitQD = 0x100,                  /* 8-bit color QD */
  225.     gestalt32BitQD = 0x200,                 /* 32-bit color QD */
  226.     gestalt32BitQD11 = 0x210,               /* 32-bit color QDv1.1 */
  227.     gestalt32BitQD12 = 0x220,               /* 32-bit color QDv1.2 */
  228.     gestalt32BitQD13 = 0x230,               /* 32-bit color QDv1.3 */
  229.  
  230. #define    gestaltQuickdrawFeatures    'qdrw'    /* quickdraw features */
  231.  
  232.     gestaltHasColor = 0,                    /* color quickdraw present */
  233.     gestaltHasDeepGWorlds = 1,                /* GWorlds can be deeper than 1-bit */
  234.     gestaltHasDirectPixMaps = 2,            /* PixMaps can be direct (16 or 32 bit) */
  235.     gestaltHasGrayishTextOr    = 3,            /* supports text mode grayishTextOr */
  236.  
  237. #define gestaltPhysicalRAMSize 'ram '       /* physical RAM size */
  238. #define gestaltPopupAttr 'pop!'             /* popup cdef attributes */
  239.  
  240.     gestaltPopupPresent = 0,
  241.  
  242. #define gestaltResourceMgrAttr 'rsrc'       /* Resource Mgr attributes */
  243.  
  244.     gestaltPartialRsrcs = 0,                /* True if partial resources exist */
  245.  
  246. #define gestaltScriptMgrVersion 'scri'      /* Script Manager version number    <08/05/89 pke> */
  247. #define gestaltScriptCount 'scr#'           /* number of active script systems    <08/05/89 pke> */
  248. #define gestaltSerialAttr 'ser '            /* Serial attributes */
  249.  
  250.     gestaltHasGPIaToDCDa = 0,               /* GPIa connected to DCDa*/
  251.     gestaltHasGPIaToRTxCa = 1                 /* GPIa connected to RTxCa clock input*/
  252. };
  253. enum {
  254.     gestaltHasGPIbToDCDb = 2,               /* GPIb connected to DCDb */
  255.  
  256. #define gestaltSoundAttr 'snd '             /* sound attributes */
  257.  
  258.     gestaltStereoCapability = 0,            /* sound hardware has stereo capability */
  259.     gestaltStereoMixing = 1,                /* stereo mixing on external speaker */
  260.     gestaltSoundIOMgrPresent = 3,           /* The Sound I/O Manager is present */
  261.     gestaltBuiltInSoundInput = 4,             /* built-in Sound Input hardware is present */
  262.     gestaltHasSoundInputDevice = 5,         /* Sound Input device available */
  263.  
  264. #define gestaltStandardFileAttr 'stdf'      /* Standard File attributes */
  265.  
  266.     gestaltStandardFile58 = 0,              /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
  267.  
  268. #define gestaltTextEditVersion 'te  '       /* TextEdit version number            <08/05/89 pke> */
  269.  
  270.     gestaltTE1 = 1,                         /* TextEdit in MacIIci ROM <8Aug89smb> */
  271.     gestaltTE2 = 2,                          /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) <8Aug89smb> */
  272.     gestaltTE3 = 3,                         /* TextEdit with 6.0.4 Script Systems all but MacIIci <8Aug89smb> */
  273.     gestaltTE4 = 4,                         /* TextEdit in System 7.0 */
  274.     gestaltTE5 = 5,                         /* TextWidthHook available in TextEdit */
  275.  
  276. #define gestaltTermMgrAttr 'term'           /* terminal mgr attributes */
  277.  
  278.     gestaltTermMgrPresent = 0,
  279.     gestaltTermMgrErrorString = 2,
  280.     
  281. #define gestaltTimeMgrVersion 'tmgr'        /* time mgr version */
  282.  
  283.     gestaltStandardTimeMgr = 1,             /* standard time mgr is present */
  284.     gestaltRevisedTimeMgr = 2,              /* revised time mgr is present */
  285.     gestaltExtendedTimeMgr = 3,             /* extended time mgr is present */
  286.  
  287. #define gestaltVMAttr 'vm  '                /* virtual memory attributes */
  288.  
  289.     gestaltVMPresent = 0,                   /* true if virtual memory is present */
  290.  
  291. /*************************
  292.  *    Info-only selectors
  293.  ************************/
  294.  
  295. #define gestaltMachineType 'mach'           /* machine type */
  296.  
  297.     kMachineNameStrID = -16395,
  298.     gestaltClassic = 1
  299. };
  300. enum {
  301.     gestaltMacXL = 2,
  302.     gestaltMac512KE = 3,
  303.     gestaltMacPlus = 4,
  304.     gestaltMacSE = 5,
  305.     gestaltMacII = 6,
  306.     gestaltMacIIx = 7,
  307.     gestaltMacIIcx = 8,
  308.     gestaltMacSE030 = 9,
  309.     gestaltPortable = 10,
  310.     gestaltMacIIci = 11,
  311.     gestaltMacIIfx = 13,
  312.     gestaltMacClassic = 17,
  313.     gestaltMacIIsi = 18,
  314.     gestaltMacLC = 19
  315.  
  316. #define gestaltMachineIcon 'micn'           /* machine icon */
  317. #define gestaltROMSize 'rom '               /* rom size */
  318. #define gestaltROMVersion 'romv'            /* rom version */
  319. #define gestaltSystemVersion 'sysv'         /* system version*/
  320. };
  321.  
  322. #ifdef __cplusplus
  323. extern "C" {
  324. #endif
  325. #if SystemSevenOrLater
  326. #pragma parameter __D0 Gestalt(__D0,__A1)
  327. pascal OSErr Gestalt(OSType selector,long *response)
  328.     = {0xA1AD,0x2288}; 
  329. #else
  330. pascal OSErr Gestalt(OSType selector,long *response);
  331. #endif
  332. pascal OSErr NewGestalt(OSType selector,ProcPtr gestaltFunction); 
  333. pascal OSErr ReplaceGestalt(OSType selector,ProcPtr gestaltFunction,ProcPtr *oldGestaltFunction); 
  334. #ifdef __cplusplus
  335. }
  336. #endif
  337.  
  338. #endif
  339.